// import { useLocation } from "react-router-dom"
import { useSearchParams } from "react-router-dom"
export default function Info(){
    // let {name,price} = useLocation().state;
    let [search,setSearch] = useSearchParams();
    let name = search.get("name");
    let price = search.get("price");
    return (
        <div>
            <h1>详情页---{name}--{price}</h1>
        </div>
    )
}